package com.cheetah.exceptions;

/**
 * @Author Administrator
 * @Date 2019/7/25
 * @Version V1.0
 * @Description:
 **/
public enum CommonError implements Error {

    ERROR_CODE_0(0,""),
    ERROR_CODE_401(401,"鉴权不通过"),
    ERROR_CODE_500(500,"服务器内部异常"),
    ERROR_CODE_501(501,"业务逻辑异常")

            ;


    private String message;

    private int errorCode;

    private CommonError(int errorCode, String message){
        this.message = message;
        this.errorCode = errorCode;
    }

    public int getErrorCode(){
        return this.errorCode;
    }

    public String getMessage(){
        return this.message;
    }

    public CommonError getErrorEnums(){
        return this;
    }
}
